import store from '@/store'
export const tableOption = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  viewBtn:true,
  addBtn: false,
  editBtn:true,
  delBtn:false,
  selection:true,
  viewBtnText:"预览",
  arrow:false,
  labelWidth: 120,
  searchMenuSpan: 6,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "线路编码",
      "prop": "lineCode",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "车站编号",
      "prop": "stationCode",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "售票员ID",
      "prop": "conductorPersonId",
      hide:true,
      display:false,
    },	  {
      "type": "select",
      "label": "售票员",
      "prop": "conductorPersonName",
      component: 'user-select',
      params: {
        userCodeKey: 'conductorPersonJobNo',
        operateNo:'deviceOperatorNum',
        belongToStation: true
      },
      searchLabelWidth:90,
      search:true,
      rules: [{
        required: true,
        message: '请选择售票员'
      }]
    },	  {
      "type": "input",
      "label": "售票员工号",
      "prop": "conductorPersonJobNo",
      disabled:true,
    },	  {
      "type": "select",
      "label": "设备操作号",
      "prop": "deviceOperatorNum",
      searchLabelWidth:90,
      dicUrl:"/support/swpmdeviceoperationcode/page",
      props: {
        label: 'operationCode',
        value: 'operationCode',
        res: 'data.records'
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
        size: -1,
        lineCode: store.getters.userInfo.lineCode,
        stationCode: store.getters.userInfo.stationCode
      },
      search:true,
      rules: [{
        required: true,
        message: '请选择设备操作号'
      }]
    },	  {
      "type": "date",
      "label": "上交时间",
      "prop": "handTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        message: '请选择上交时间'
      }]
    },	  {
      "type": "date",
      "label": "上交时间",
      "prop": "handTimeDTO",
      search: true,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      hide: true,
      display: false,
      showColumn: false
    }, {
      "type": "number",
      "label": "预收款金额",
      "prop": "adavncePayment",
      "precision": 2,
      step:0,
      rules: [{
        required: true,
        message: '请输入预收款金额'
      }]
    },	  {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "数据更新时间",
      "prop": "updateTime",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "删除标志 1：删除 0：未删",
      "prop": "delFlag",
      hide:true,
      display:false,
    }  ]
}


export const tableOptionAdd = {
  "border": true,
  "index": true,
  "indexLabel": "序号",
  "stripe": true,
  "menuAlign": "center",
  "align": "center",
  viewBtn:false,
  editBtn:false,
  delBtn:false,
  submitBtn:false,
  emptyBtn:false,
  viewBtnText:"预览",
  arrow:false,
  labelWidth: 120,
  searchMenuSpan: 6,
  "column": [
	  {
      "type": "input",
      "label": "唯一标识",
      "prop": "id",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "线路编码",
      "prop": "lineCode",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "车站编号",
      "prop": "stationCode",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "售票员ID",
      "prop": "conductorPersonId",
      hide:true,
      display:false,
    },	  {
      "type": "select",
      "label": "售票员",
      "prop": "conductorPersonName",
      component: 'user-select',
      params: {
        userCodeKey: 'conductorPersonJobNo',
        operateNo:'deviceOperatorNum',
        belongToStation: true
      },
      searchLabelWidth:90,
      search:true,
      rules: [{
        required: true,
        message: '请选择售票员'
      }]
    },	  {
      "type": "input",
      "label": "售票员工号",
      "prop": "conductorPersonJobNo",
      disabled:true,
    },	  {
      "type": "select",
      "label": "设备操作号",
      "prop": "deviceOperatorNum",
      searchLabelWidth:90,
      dicUrl:"/support/swpmdeviceoperationcode/page",
      props: {
        label: 'operationCode',
        value: 'operationCode',
        res: 'data.records'
      },
      filterable: true,
      allowCreate: true,
      dicQuery: {
        size: -1,
        lineCode: store.getters.userInfo.lineCode,
        stationCode: store.getters.userInfo.stationCode
      },
      search:true,
      rules: [{
        required: true,
        message: '请选择设备操作号'
      }]
    },	  {
      "type": "date",
      "label": "上交时间",
      "prop": "handTime",
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd HH:mm:ss',
      rules: [{
        required: true,
        message: '请选择上交时间'
      }]
    }, {
      "type": "number",
      "label": "预收款金额",
      "prop": "adavncePayment",
      "precision": 2,
      step:0,
      rules: [{
        required: true,
        message: '请输入预收款金额'
      }]
    },	  {
      "type": "input",
      "label": "部门ID",
      "prop": "deptId",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "创建人ID",
      "prop": "creatorId",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "创建人名称",
      "prop": "creatorName",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "创建时间",
      "prop": "createTime",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "数据更新时间",
      "prop": "updateTime",
      hide:true,
      display:false,
    },	  {
      "type": "input",
      "label": "删除标志 1：删除 0：未删",
      "prop": "delFlag",
      hide:true,
      display:false,
    }  ]
}

